package com.ysy.logistics.entities.stock;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ysy.common.entities.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * @ClassDescription:
 * @Author:姚斯羽
 * @Create:2025/3/30 22:34
 **/
@Data
@TableName("store_house")
@Schema(name = "仓库", description = "库存表")
@Accessors(chain = true)
public class StoreHouse extends BaseEntity {

    @Schema(description = "id")
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    @Schema(description = "名称")
    @TableField(value = "name")
    @NotBlank(message = "仓库名不能为空")
    private String name;

    @Schema(description = "容量")
    @TableField(value = "capacity")
    @Min(value = 1,message = "容量不能小于1")
    private Integer capacity;

    @Schema(description = "已使用容量")
    @TableField(value = "used_capacity")
    private Integer usedCapacity;

    @Schema(description = "位置")
    @TableField(value = "location")
    @NotBlank(message = "仓库位置不能为空")
    private String location;

    @Schema(description = "负责人")
    @TableField(value = "manager")
    @NotBlank(message = "负责人不能为空")
    private String manager;

    @Schema(description = "备注")
    @TableField(value = "remark")
    private String remark;
}
